package openones.mvcportlet.multiforwards.control;

import java.io.IOException;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;

import openones.corewa.BaseOutForm;
import openones.mvcportlet.multiforwards.form.ListForm;
import rocky.mvcportlet.control.BaseControl;

public class ListControl extends BaseControl {
    
    public ListForm procSearch(ActionRequest request, ActionResponse response) throws PortletException, IOException  {
        ListForm form = new ListForm();
        LOG.debug("procList.START");
        // Get submitted data
        String mode = request.getParameter("mode");
        LOG.debug("mode="+ mode);
        
        //request.getPortletSession().setAttribute("result", "Result of list");
        //request.getPortletSession().setAttribute("result", "Result of list", PortletSession.PORTLET_SCOPE);
        form.setMode(mode);
        form.setResult("Result of list");
        LOG.debug("procList.END");
        
        return form;
    }
    
    public BaseOutForm procGoAdvanced(ActionRequest request, ActionResponse response) throws PortletException, IOException  {
        LOG.debug("procGoAdvanced.START");
        LOG.debug("procGoAdvanced.END");
        
        return null;
    }
    
    public BaseOutForm procGoHome(ActionRequest request, ActionResponse response) throws PortletException, IOException  {
        LOG.debug("procGoHome.START");
        LOG.debug("procGoHome.END");
        
        return null;
    }
}
